#include "stm32f10x.h"                  // Device header
#include "PWM.h"
#include "Motor.h"
#include "main.h"

void Car_Init(void)
{
	Motor_Init();
}

void Car_Go(uint8_t Speed)
{
	Left_F_Go();
	Left_B_Go();
	Right_F_Go();
	Right_B_Go();
	Speed_Set(Speed);
}

void Car_Back(uint8_t Speed)
{
	Left_F_Back();
	Left_B_Back();
	Right_F_Back();
	Right_B_Back();
	Speed_Set(Speed);
}

void Car_Stop(uint8_t Speed)
{
	Left_F_Stop();
	Left_B_Stop();
	Right_F_Stop();
	Right_B_Stop();
	Speed_Set(Speed);
}

void Car_Left(uint8_t Speed)							//A反转，B正转
{
	Left_F_Back();
	Left_B_Go();
	Right_F_Go();
	Right_B_Back();
	Speed_Set(Speed);
}

void Car_Right(uint8_t Speed)							//A正转，B反转
{
	Left_F_Go();
	Left_B_Back();
	Right_F_Back();
	Right_B_Go();
	Speed_Set(Speed);
}
